Skip to content

Conversation

@enndubyu
Copy link

@enndubyu enndubyu commented Jan 13, 2026

Implements #50

I'm using dma to relay outgoing email through Oracle Cloud's smarthost service, but bumped into issue #50 due to Oracle's exclusive support for PLAIN auth.

Changes:

  1. Adds support for PLAIN auth mechanism.
  2. Log an error when there are no auth mechanisms in common with server.

@enndubyu enndubyu marked this pull request as ready for review January 21, 2026 06:56
free(temp);
} else if (features->auth.plain) {
// PLAIN mechanism
size_t buflen = strlen(login) + strlen(password) + 3;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use asprintf instead of malloc+snprintf

/* Send AUTH command according to RFC 2554 */
send_remote_command(fd, "AUTH LOGIN");
const char *auth_mechanism = features->auth.login ? "LOGIN" : "PLAIN";
send_remote_command(fd, "AUTH %s", auth_mechanism);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's break out login an plain like auth_md5 into separate functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants